function [Thickness_figure]=readBloodROI( file_dir, image_name, Obj_slice_num,center_pos,t1_t2,ROI_name)

% Case = 'T2map';
% image_name = 'Yousheng_Chen_WIP_HiRes-NAV-4T2MapTE_CLEAR_11_1_t2map_R90';    % no suffix
% file_dir =  'D:\dingDATA\segmentation  result\ROI_Zhou\20121227 MyoT2 NV009\';
ROI_dir = [file_dir ROI_name] ;
if(~isdir(ROI_dir))
    disp('please input correct ROI path');
    return;
end
image_path = [file_dir image_name '.mat'];
load(image_path);
IM = T1(:,:,:,t1_t2);
roifiles = dir([ROI_dir filesep '*.mat']);
file_length = length( roifiles );
ROI_info_tables = {};
ROI_info_tables_ix = 1;
start_Si = 100;
end_Si = 0;
for file_ix = 1:file_length
    file_name = roifiles(file_ix,1).name;
    if( ~isempty( regexpi(file_name,'BS\d\d.mat')) || ~isempty(regexpi(file_name,'BS\d.mat')))
        load([ ROI_dir filesep file_name]);
        str_cell = regexpi(file_name,'[\d][\d]{0,}','match') ;
        slice_num = str2num(str_cell{1,1});
        if(  slice_num == Obj_slice_num )
            roi_info.roi_info_table = ROI_info_table;
            roi_info.slice_num = slice_num ;
            ROI_info_tables{1,1} = roi_info;
            %load aha info 
            try 
                load([ ROI_dir filesep 'AHA' num2str(slice_num) '.mat']);
                aha_info = AHAInfo;
            catch
                aha_info = [];
            end
                
        end
    end
end

slice_ix = 1;
roi_info_table = ROI_info_tables{1,slice_ix}.roi_info_table;
slice_i = ROI_info_tables{1,slice_ix}.slice_num;
inImg = IM(:,:,slice_i,1) ;

inImg = double(inImg);
Debug_disp = 0;
local_im = inImg;

EPI_x =  roi_info_table(1,1).ROI_x_coordinates; % - floor( min_EPI_x );
EPI_y =  roi_info_table(1,1).ROI_y_coordinates ;% - floor( min_EPI_y );
IM_EPI=local_im;
[EPI_mesh_x,EPI_mesh_y] = meshgrid([1:size(IM_EPI,2)],[1:size(IM_EPI,1)]);
EPI_RR = inpolygon(EPI_mesh_x,EPI_mesh_y,EPI_x,EPI_y);
[EPI_i,EPI_j] = find(EPI_RR);
mean_EPI_i = mean( EPI_i );
mean_EPI_j = mean( EPI_j );
if(Debug_disp)
	f = figure;
	imagesc(IM_EPI);
	axis equal; 
	hold on;
    title('Press Any Key To Continue');
 	plot(EPI_j,EPI_i,'r.');
	plot(EPI_x,EPI_y,'r-.')
	colormap(get(f, 'Colormap'));
end
IM_EPI_ex =zeros(size(IM_EPI));
IM_EPI_ex(sub2ind(size(IM_EPI),EPI_i,EPI_j)) = 1;
if(Debug_disp)
	figure,
	imagesc(IM_EPI_ex);
	axis equal; 
	hold on;
    title('Press Any Key To Continue');
 	plot(EPI_j,EPI_i,'r.');
	plot(EPI_x,EPI_y,'r-.')
end
%remove NaN type 
IM_EPI_ex(isnan( IM_EPI_ex)) = 0;
Thickness_figure = IM_EPI_ex.*inImg;
end



